<div ng-controller="billStoreController">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-inverse">
                <div class="panel-heading">
                    <div class="panel-heading-btn">
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
                    </div>
                    <h4 class="panel-title">票据商城</h4>
                </div>
                <div class="panel-body">
                    <div class="form-inline filter-option">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="page-store-checkout edit-billStore-bos edit-billStore-bos1">
                                    <p>
                                        <label>承兑机构</label>
                                        <span ng-class="{true:'acctive_on',false:''}[filter.accept_type_ids == '' || filter.accept_type_ids.length == 0]" ng-click="acceptTypeAllChange()">不限</span>
                                        <span ng-class="{true:'acctive_on',false:''}[filter.accept_type_ids.indexOf('401') != -1]" ng-click="acceptTypeChange('401')">国股</span>
                                        <span ng-class="{true:'acctive_on',false:''}[filter.accept_type_ids.indexOf('402') != -1]" ng-click="acceptTypeChange('402')">城商</span>
                                        <span ng-class="{true:'acctive_on',false:''}[filter.accept_type_ids.indexOf('404') != -1]" ng-click="acceptTypeChange('404')">三农</span>
                                        <span ng-class="{true:'acctive_on',false:''}[filter.accept_type_ids.indexOf('405') != -1]" ng-click="acceptTypeChange('405')">村镇</span>
                                        <span ng-class="{true:'acctive_on',false:''}[filter.accept_type_ids.indexOf('406') != -1]" ng-click="acceptTypeChange('406')">外资</span>
                                        <span ng-class="{true:'acctive_on',false:''}[filter.accept_type_ids.indexOf('407') != -1]" ng-click="acceptTypeChange('407')">财务公司</span>
                                        <span ng-class="{true:'acctive_on',false:''}[filter.accept_type_ids.indexOf('408') != -1]" ng-click="acceptTypeChange('408')">商票</span>
                                        <span class="span-int1"><input class="price1 price11" ng-change="changeAcceptorName()" ng-model="filter.acceptor_name" placeholder="&nbsp;请输入承兑人名称" /></span>
                                        <span class="price13" ng-if="filter.isShowAcceptor" ng-click="submitFilter()">搜索</span>
                                        <span class="price13" ng-if="filter.isShowAcceptor" ng-click="deleteFliter()">清空</span>
                                    </p>
                                    <p class="font-p">
                                        <label>票面金额</label>
                                        <span ng-class="{'acctive_on':(filter.bill_sum_price == '')}" ng-click="priceTypeAllChange()">不限</span>
                                        <span ng-class="{'acctive_on':(filter.bill_sum_price == 10)}" ng-click="priceTypeChange(10)">(0,10万)</span>
                                        <span ng-class="{'acctive_on':(filter.bill_sum_price == 50)}" ng-click="priceTypeChange(50)">[10万,50万)</span>
                                        <span ng-class="{'acctive_on':(filter.bill_sum_price == 100)}" ng-click="priceTypeChange(100)">[50万,100万)</span>
                                        <span ng-class="{'acctive_on':(filter.bill_sum_price == 101)}" ng-click="priceTypeChange(101)">[100万,+∞)</span>
                                        <span ng-class="{'acctive_on1':(filter.bill_sum_price == 'custom')}">[<input class="price1 price11" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" ng-change="getPrice1()" ng-model="model.bill_sum_price_min" placeholder="&nbsp;最小" />万,<input class="price1 price11" ng-model="model.bill_sum_price_max" ng-change="getPrice1()" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" placeholder="&nbsp;最大" />万]</span>
                                        <!--<input class="price1" ng-change="getPrice1()" ng-model="model.bill_sum_price_min" placeholder="最小金额" />万--<input class="price1" ng-model="model.bill_sum_price_max" ng-change="getPrice1()" placeholder="不超过" />万-->
                                    </p>
                                    <p class="font-p">
                                        <label>到期天数</label>
                                        <span ng-class="{'acctive_on':(filter.deadline_time == '')}" ng-click="deadlineTimeTypeAllChange()">不限</span>
                                        <span ng-class="{'acctive_on':(filter.deadline_time == 90)}" ng-click="deadlineTimeTypeChange(90)">(0,90)</span>
                                        <span ng-class="{'acctive_on':(filter.deadline_time == 150)}" ng-click="deadlineTimeTypeChange(150)">[90,150)</span>
                                        <span ng-class="{'acctive_on':(filter.deadline_time == 185)}" ng-click="deadlineTimeTypeChange(185)">[150,186)</span>
                                        <span ng-class="{'acctive_on':(filter.deadline_time == 330)}" ng-click="deadlineTimeTypeChange(330)">[186,330)</span>
                                        <span ng-class="{'acctive_on':(filter.deadline_time == 331)}" ng-click="deadlineTimeTypeChange(331)">[330,+∞)</span>
                                        <span ng-class="{'acctive_on1':(filter.deadline_time == 'custom')}">[<input class="price1 price11 price22" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" ng-change="getDate1()" ng-model="model.deadline_time_min" placeholder="&nbsp;最小" />,<input class="price1 price11 price22" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" ng-model="model.deadline_time_max" ng-change="getDate1()" placeholder="&nbsp;小于" />)</span>
                                        <!--[<input class="price1" ng-model="model.deadline_time_min" placeholder="最小天数" />--<input class="price1" ng-model="model.deadline_time_max" placeholder="最大天数" />-->
                                    </p>
                                    <p>
                                        <label>背书瑕疵</label>
                                        <span ng-class="{'acctive_on':(filter.bill_flaws == '')}" ng-click="flawTypeAllChange()">不限</span>
                                        <span ng-class="{'acctive_on':(filter.bill_flaws == 1500)}" ng-click="flawTypeChange(1500)">无瑕疵</span>
                                        <span ng-class="{'acctive_on':(filter.bill_flaws == 1501)}" ng-click="flawTypeChange(1501)">有瑕疵</span>
                                    </p>
                                    <p>
                                        <label>竞价方式</label>
                                        <span ng-class="{'acctive_on':(filter.bidding_mode == '')}" ng-click="biddingTypeAllChange()">不限</span>
                                        <span ng-class="{'acctive_on':(filter.bidding_mode == 3212)}" ng-click="biddingTypeChange(3212)">自由竞价</span>
                                        <span ng-class="{'acctive_on':(filter.bidding_mode == 3210)}" ng-click="biddingTypeChange(3210)">一口价</span>
                                    </p>
                                    <p>
                                        <label>票据状态</label>
                                        <span ng-class="{'acctive_on':(filter.bill_status == '')}" ng-click="billStatusTypeAllChange()">不限</span>
                                        <span ng-class="{'acctive_on':(filter.bill_status == 801)}" ng-click="billStatusTypeChange(801)">询价中</span>
                                        <span ng-class="{'acctive_on':(filter.bill_status == 5)}" ng-click="billStatusTypeChange(5)">交易中</span>
                                        <span ng-class="{'acctive_on':(filter.bill_status == 15)}" ng-click="billStatusTypeChange(15)">交易完成</span>
                                    </p>
                                    <!--ng-if="filter.show_price"-->
                                    <p style="position:relative;">
                                        <label>买方价格</label>
                                        <input placeholder="年利率" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" ng-model="filter.offer_rate" class="price1 price2 price3 price_int1 price_int11" />%<i class="price_i1">+</i>
                                        <input placeholder="每十万手续费" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" ng-model="filter.offer_every_plus" class="price1 price2 price4 price_int11" />元
                                        <i class="i_img" ng-mouseenter="mouse_enter()" ng-mouseleave="mouse_leave()"><img src="assets/img/tanhao.png" /></i>
                                        <span ng-if="filter.showHelp">如：输入5.0+60，筛选出可买入的票源，买卖差价可排序</span>
                                    </p>
                                    <div class="page-store-btn page-store-btn1">
                                        <button ng-click="deleteFliter()" class="deleteFilter">清空</button>
                                        <button ng-click="submitFilter()" class="changeFilter">筛选</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="page-store-main-title">
                        <p class="page1-title">
                            <i></i>
                            <span class="select-bill">
                                <strong style="border-right: 1px solid #202020;padding-right: 20px;">票源列表</strong>
                                <span class="fast-order-by fast-order-by1">
                                    <span>快速排序：</span>
                                    <span ng-click="pushTimeSort()" style="cursor:pointer;margin-right:35px;position:relative;" ng-class="{'click_in':filters.showPushTime}">
                                        发布时间
                                        <span style="position: absolute;top:-11px;left:57px;">
                                            <em class="glyphicon glyphicon-triangle-top" style="position:absolute;top:10px;color: #ccc;" ng-class="{'click_in1':filters.showPushTimeEm && filters.showPushTime}"></em>
                                            <em class="glyphicon glyphicon-triangle-bottom" style="color:#ccc;" ng-class="{'click_in1':!filters.showPushTimeEm && filters.showPushTime}"></em>
                                        </span>
                                    </span>
                                    <span ng-click="priceSort()" style="cursor:pointer;margin-right:35px;position:relative;" ng-class="{'click_in':filters.showPrice1}">
                                        票面金额
                                        <span style="position: absolute;top:-11px;left:57px;">
                                            <em class="glyphicon glyphicon-triangle-top" style="position:absolute;top:10px;color: #ccc;" ng-class="{'click_in1':filters.showPriceEm && filters.showPrice1}"></em>
                                            <em class="glyphicon glyphicon-triangle-bottom" style="color:#ccc;" ng-class="{'click_in1':!filters.showPriceEm && filters.showPrice1}"></em>
                                        </span>
                                    </span>
                                    <span ng-click="dateSort()" style="cursor:pointer;margin-right:35px;position:relative;" ng-class="{'click_in':filters.showDete1}">
                                        到期天数
                                        <span style="position: absolute;top:-11px;left:57px;">
                                            <em class="glyphicon glyphicon-triangle-top" style="position:absolute;top:10px;color: #ccc;" ng-class="{'click_in1':filters.showDeteEm && filters.showDete1}"></em>
                                            <em class="glyphicon glyphicon-triangle-bottom" style="color:#ccc;" ng-class="{'click_in1':!filters.showDeteEm && filters.showDete1}"></em>
                                        </span>
                                    </span>
                                    <span ng-click="enerySort()" style="cursor:pointer;margin-right:35px;position:relative;" ng-if="!filter.showBid" ng-class="{'click_in':filters.showQuick}">
                                        买卖差额
                                        <span style="position: absolute;top:-11px;left:57px;">
                                            <em class="glyphicon glyphicon-triangle-top" style="position:absolute;top:10px;color: #ccc;" ng-class="{'click_in1':filters.showChoose && filters.showQuick}"></em>
                                            <em class="glyphicon glyphicon-triangle-bottom" style="color:#ccc;" ng-class="{'click_in1':!filters.showChoose && filters.showQuick}"></em>
                                        </span>
                                    </span>
                                </span>
                            </span>
                        </p>
                        <div class="clearfix"></div>
                    </div>
                    <table id="data-table" ng-table="tableParams" template-pagination="template/pagination.html" class="table table-striped table-bordered table-hover table-condensed">
                        <tr ng-repeat="item in $data">
                            <!--<td data-title="'序号'" width="10%" class="text-center">{{ first + $index }}</td>-->
                            <td data-title="'发布时间'" sortable="" class="text-center">{{ item.bill_product_create_time | date:'MM-dd HH:mm' }}</td>
                            <td data-title="'出票企业'" sortable="" class="text-center">{{ item.drawer_name }}</td>
                            <!--<td data-title="'票据类型'" sortable="" class="text-center">{{ item.bill_type_id == 102 ? '纸票' : '电票' }}</td>-->
                            <td data-title="'承兑机构'" sortable="" class="text-center">{{ item.acceptor_type_name == null || item.acceptor_type_name == '' || item.acceptor_type_name == undefined ? '--' : item.acceptor_type_name }}</td>
                            <td data-title="'票面金额'" sortable="" class="text-center">{{ item.bill_sum_price | currency }}</td>
                            <td data-title="'承兑人'" sortable="" class="text-center">{{ item.acceptor_name == null || item.acceptor_name == '' || item.acceptor_name == undefined ? '--' : item.acceptor_name | limitTo:8 }}</td>
                            <td data-title="'到期时间'" sortable="" class="text-center">{{ item.bill_deadline_time | date:'yyyy-MM-dd' }}</td>
                            <td data-title="'背书瑕疵'" sortable="" class="text-center">{{ (item.bill_flaw_ids | myfilter) == 1500 ? '无瑕疵' : '有瑕疵' }}</td>
                            <td data-title="'每十万扣'" sortable="" class="text-center" ng-if="filter.showBid">
                                <span>{{ item.bidding_mode == 3210 ? '一口价' : "竞价"}}<i ng-if="item.every_plus_interest > 0">{{item.every_plus_interest}}元</i></span>
                            </td>
                            <td data-title="'每十万扣'" sortable="" class="text-center" ng-if="!filter.showBid" style="position:relative;">
                                <i ng-if="item.active" class="po_rate">卖方({{item.bill_rate}}%)/买方({{item.offer_rate}}%)/差价</i>
                                <span ng-if="item.bidding_mode == 3210 || (item.bidding_mode == 3212 && item.every_plus_interest > 0)" ng-mouseenter="po_enter(item)" ng-mouseleave="po_leave(item)"><em style="color:#f00;font-style: normal;font-size: 14px;">{{item.billEveryPlus}}</em>/{{item.offerEveryPlus}}/<i ng-class="{'prise_color':item.billOfferEveryPlus<0}" class="colors" style="font-size:14px;text-decoration:underline;">{{item.billOfferEveryPlus}}</i></span>
                                <span ng-if="item.bidding_mode == 3212 && item.every_plus_interest == 0"><span style="color:#f00;">竞价</span></span>
                            </td>
                            <td data-title="'状态'" sortable="" class="text-center">{{ item.bill_status_name }}</td>
                            <td data-title="'联系人'" sortable="" class="text-center">{{ item.contact_name }}</td>
                            <td data-title="'联系方式'" sortable="" class="text-center">{{ item.contact_phone }}</td>
                            <td class="text-center width-100 text-nowrap">
                                <button class="btn btn-info btn-xs" ng-click="goToPcc(item)">
                                    <i class="fa fa-edit"></i> 匹配
                                </button>
                            </td>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

